/** ###################################################################
**     Filename  : Accel.H
**     Project   : project_xgate
**     Processor : MC9S12XDP512BMPV
**     Compiler  : CodeWarrior HCS12X C Compiler
**     Date/Time : 3/25/2009, 2:53 AM
**     Contents  :
**         User source code
**
**     (c) Copyright UNIS, a.s. 1997-2008
**     UNIS, a.s.
**     Jundrovska 33
**     624 00 Brno
**     Czech Republic
**     http      : www.processorexpert.com
**     mail      : info@processorexpert.com
** ###################################################################*/

#ifndef __Accel_H
#define __Accel_H

/* Including needed modules to compile this module/procedure */
//#include "X.h"
//#include "Accel_Y.h"
//#include "Y.h"
/* Include shared modules, which are used for whole project */
#include "PE_Types.h"
#include "PE_Error.h"
#include "PE_Const.h"

/* MODULE Accel */

typedef struct{    
  word hightime;
  word lowtime;
  byte source;
}Accel_TData;

#define ACCELX 0
#define ACCELY 1

void Accel_Init(void);
void Accel_X_Process(void);
void Accel_Y_Process(void);
word Accel_GetDuty(Accel_TData data);
signed short Accel_GetAccelX(word xduty);
signed short Accel_GetAccelY(word yduty);
byte Accel_Calibrate(void);

/* END Accel */

#endif

